package study.designpattern.composite;

public class MainComposite {
public static void main(String[] args) {
    Eclipse e1 = new Eclipse();
    Eclipse e2 = new Eclipse();
    Eclipse e3 = new Eclipse();
    
    CompositeGraphic cg = new CompositeGraphic();
    CompositeGraphic cgRoot = new CompositeGraphic();
    cg.add(e1);
    cg.add(e2);
    
    cgRoot.add(cg);
    cgRoot.add(e3);
    cgRoot.print();
}
}
